/*个人中心事件*/
function personal(){
	var personalout = document.querySelector(".personal-wrap .cancel");
	var personalin = document.querySelector(".web .icon-caidanlan");
	var wop = document.querySelector(".personal-wrap");
	function personal_show(){
		wop.classList.add("personal-show")
	}
	function personal_out(){
		wop.classList.remove("personal-show")
	}
	personalout.addEventListener("click",personal_out,false);
	personalin.addEventListener("click",personal_show,false);
}

/*搜索事件*/
function search(){
	var innt_index = document.querySelector(".web .sousou");
	var out = document.querySelector(".search-out");
	var innt = document.querySelector(".sea");
	var wrop = document.querySelector(".search-hot");
	function search_show(){
		wrop.classList.add("search-show")
	}
	function search_out(){
		wrop.classList.remove("search-show")
	}
	out.addEventListener("click",search_out,false);
	innt.addEventListener("touchend",search_show,false);
	innt_index.addEventListener("click",search_show,false);
}

/*登录事件*/
function logined(){
 	var innt_login = document.querySelector(".login-in");
 	var out_login = document.querySelector(".login-out");
 	var wrop = document.querySelector(".login-wrap");
 	function login_show(){
		wrop.classList.add("login-show")
	}
	function login_out(){
		wrop.classList.remove("login-show")
	}
	out_login.addEventListener("click",login_out);
	innt_login.addEventListener("click",login_show);
}

/*导航栏切换事件*/
function menu() {
	var an = document.querySelectorAll(".menu");
	var img = document.querySelectorAll(".menu div img");
	var div = document.querySelectorAll(".web-wrap");
	for(let i = 0; i < an.length; i++) {
		an[i].addEventListener("click", function() {
			for(var j = 0; j < div.length; j++) {
				div[j].classList.remove("chiefly-show");
				an[j].classList.remove("active");
				
			}
			div[i].classList.add("chiefly-show");
			an[i].classList.add("active");
		})
	}
}

/*交互效果*/
function interaction() {
	var li = document.querySelectorAll("li");
	for(let i = 0; i < li.length; i++) {
		li[i].addEventListener("touchstart", function() {
			li[i].classList.add("touch");
		})
		li[i].addEventListener("touchend", function() {
			li[i].classList.remove("touch");
		})
	}
}


/*了解省广 进入 返回*/
function gimc(){
	var back_intro = document.querySelector(".intro .back");
	var back_unfold = document.querySelector(".unfold .back");
	var intro = document.querySelector(".gimc .intro");
	var unfold = document.querySelector(".gimc .unfold");
	var in_intro = document.querySelector(".gimc .ad .to");
	var in_unfold = document.querySelectorAll(".gimc .contect>ul li");
	in_intro.addEventListener("click", function() {
		intro.classList.add("display");
	});
	back_intro.addEventListener("click", function() {
		intro.classList.remove("display");
	});
	back_unfold.addEventListener("click", function() {
		unfold.classList.remove("display");
	});
	for(let i = 0; i < in_unfold.length; i++) {
		in_unfold[i].addEventListener("click", function() {
			unfold.classList.add("display");
		})
	}
}

/*gimc-3*/
function gimcc() {
	var an = document.querySelectorAll(".intro .intro-bot p");
	var div = document.querySelectorAll(".intro .intro-con");
	for(let i = 0; i < an.length; i++) {
		an[i].addEventListener("click", function() {
			for(var j = 0; j < div.length; j++) {
				div[j].classList.remove("active");
				an[j].classList.remove("active");
				
			}
			div[i].classList.add("active");
			an[i].classList.add("active");
		})
	}
}

/*文章*/
function wen(){
	var back_article = document.querySelector(".part .back");
	var article = document.querySelector(".part");
	var in_article = document.querySelectorAll(".article .contectchar .soy");
	back_article.addEventListener("click", function() {
		article.classList.remove("display");
	});
	for(let i = 0; i < in_article.length; i++) {
		in_article[i].addEventListener("click", function() {
			article.classList.add("display");
		})
	}
}

/*资源*/
function ziyuan(){
	var back_resource = document.querySelector(".resource .back");
	var resource = document.querySelector(".video");
	var in_resource = document.querySelectorAll(".resource .contect>ul li");
	back_resource.addEventListener("click", function() {
		resource.classList.remove("display");
	});
	for(let i = 0; i < in_resource.length; i++) {
		in_resource[i].addEventListener("click", function() {
			resource.classList.add("display");
		})
	}
}

function college(){
	var back_college = document.querySelector(".college .back");
	var incident = document.querySelector(".incident");
	var in_college = document.querySelectorAll(".college .contect-zc .yuyue");
	back_college.addEventListener("click", function() {
		incident.classList.remove("display");
	});
	for(let i = 0; i < in_college.length; i++) {
		in_college[i].addEventListener("click", function() {
			incident.classList.add("display");
		})
	}
}

/*解决滑动触发touchend事件*/


